package cn.kgc.client;

import cn.kgc.base.vo.OrderItemVo;
import cn.kgc.commons.vo.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @description:
 * @author: 石浩杰
 * @date: 2023-01-02 11:24
 */
@Component
@Slf4j
public class CartFeignClientImpl implements CartFeignClient {
    @Override
    public Result<List<OrderItemVo>> getOrderItemVo(long memberId) {
        log.error("获得用户:{}对应的购物车中选中的商品信息失败，服务接口降级",memberId);
        //注意 服务降级时的编码
        return Result.error(null,"http://mall-cart/cart/getOrderItemVo",
                HttpStatus.OK.value(), "error");
    }
}
